package com.example.charactivity

import com.github.aachartmodel.aainfographics.aachartcreator.AAChartModel
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartStackingType
import com.github.aachartmodel.aainfographics.aachartcreator.AAChartType
import com.github.aachartmodel.aainfographics.aachartcreator.AASeriesElement


class GernerChartModel {
   companion object my {

       val elemt=arrayOf(
           AASeriesElement()
                   .showInLegend(false)
               .name("today")
               .color("#f48fb1")
                   .data(arrayOf(18,23,34,45)) // 这里=样可以出现饼图
       )

       var aaChartModel: AAChartModel = AAChartModel()
           .chartType(AAChartType.Pie)
           .dataLabelsEnabled(true)
           .categories(arrayOf("a","b","c","d"))
           .title("Title")
           .subtitle("sub")
           .backgroundColor("#ffffff")
           .dataLabelsEnabled(true)
           .legendEnabled(true)
           .stacking(AAChartStackingType.Normal)
          // .series(elemt)
   }

}